<?php	
/**
 * app/bootstrap.php
 *
 * @author 		Kris Rybak <kris.rybak@krisrybak.com>	
 * @copyright 	2012 Kris Rybak
 * @since 		File available since Release 1.0.0
 * @version 	1.0.0
*/

	// This constant ensures that we're operating inside bootstrap.php 
	if (!defined("YOCTO_EXE")) {
		define('YOCTO_EXE', true);
	}

	// Define path to configuration files 
	if (!defined("DIR_CONFIG")) {
		define('DIR_CONFIG', 'config');
	}

	// Define path to startup files 
	if (!defined("DIR_STARTUP")) {
		define('DIR_STARTUP', 'startup');
	}

	// This will turn on the log fonction and hold information of the environment
	require_once(ROOT . DS . DIR_APP . DS .DIR_STARTUP. DS . 'app_log.php');

	// This will check if the product has been set up
	require_once(ROOT . DS . DIR_APP . DS .DIR_CONFIG. DS . 'setup_check.php');

	// This will check and set up time zone
	require_once(ROOT . DS . DIR_APP . DS .DIR_CONFIG. DS . 'timezone.php');

	// Load basic settings
	require_once(ROOT . DS . DIR_APP . DS .DIR_STARTUP. DS . 'base_config.php');

	// If the application have already been installed lets load it 
	if ($app['installation'] == false) {
		// Nothing is installed lets start the installer
		echo "Lounching Installer";
	}
	else {
		echo "<pre>";
		totalTimeLog();
		print_r($app);
		echo "</pre>";
		//Load the router		
	}

